import requests from "../common/request";

export function queryNearbyShopList(data) {
  return requests.post({
    url: "/appointment_mobile/appointment_shop/query_nearby_shop_list",
    data: data,
  });
}
//预订（仅用于在“门店列表” store-list 组件，区分api 【queryNearbyShopList】名称）
export function queryNearbyShopList_booking(data) {
  return requests.post( {
    url: '/booking_mobile/booking_shop/query_nearby_shop_list',
    data: data
  })
}
//商铺信息
export function getAppointmentShopDetail(data) {
  return requests.get({
    url: "/appointment_mobile/appointment_shop/shop_detail",
    data,
  });
}

//排期单
export function getAppointmentShopDateTimeTable(data) {
  return requests.get({
    url: "/appointment_mobile/time_table/get_time_table",
    data,
  });
}

export function getPlanList(storeId, req) {
  return requests.post({
    url: "/appointment/anon/plan/shelf?storeId=" + storeId,
    data: req,
  });
}

//----------------预约项目信息 start
//项目列表
export function getAppointmentPlanList(data) {
  return requests.get({
    url: "/appointment_mobile/appointment_plan/plan_list",
    data,
  });
}

export function getGoodsList(data) {
  return requests.get({
    url: "/mall/anon/goods/appointment_goods",
    data,
  });
}

//----------------预约项目信息 end

//----------------预约资源信息 start
//资源列表
export function getAppointmentResourcesList(data) {
  return requests.get({
    url: "/appointment_mobile/appointment_category/category_list",
    data,
  });
}
export function getAppointmentResourcesDetail(data) {
  return requests.get({
    url: "/appointment_mobile/appointment_category/category_by_id",
    data,
  });
}

//----------------预约项目信息 end

//----------------订单处理 start
//资源列表
export function preOrder(data) {
  return requests.post({
    url: "/appointment_mobile/order/pre/preOrder",
    data,
  });
}
export function creatOrder(data) {
  return requests.post({
    url: "/appointment_mobile/order/create",
    data,
  });
}
export function getCategoryList(data) {
  return requests.post({
    url: "/appointment_mobile/appointment_category/category_list_ids",
    data,
  });
}

export function balancePay(data) {
  return requests.post({
    url: "/appointment_mobile/pay/balancePay",
    data,
  });
}
export function getWxPrepay(data) {
  return requests.post({
    url: "/appointment_mobile/pay/wxPrepay",
    data,
  });
}
export function queryOrderStatus(data) {
  return requests.get({
    url: "/appointment_mobile/order/getOrderStatus",
    data,
  });
}
export function getOrderDetail(data) {
  return requests.get({
    url: "/appointment_mobile/order/detail",
    data,
  });
}
export function editOrderReservationTime(data) {
  return requests.post({
    url: "/appointment_mobile/order/updatePreTime",
    data,
  });
}
export function delOrder(data) {
  return requests.get({
    url: "/appointment_mobile/order/deleteOrder",
    data,
  });
}
export function cancelOrder(data) {
  return requests.post({
    url: "/appointment_mobile/order/cancel",
    data,
  });
}
export function getOrderList(data) {
  return requests.post({
    url: "/appointment_mobile/order/qryList",
    data,
  });
}
export function getOrderReturnDetail(data) {
  return requests.get({
    url: "/appointment_mobile/order/refundDetail",
    data,
  });
}
export function shareGoodOrder(data) {
  return requests.post({
    url: "/appointment_mobile/goods/share",
    data,
  });
}
export function refundDetail(data) {
  return requests.get({
    url: "/appointment_mobile/order/refundDetail",
    data,
  });
}

export function getPreOrder(data) {
  return requests.get({
    url: "/appointment_mobile/order/pre/getPreOrder",
    data,
  });
}
export function autoCancel(data) {
  return requests.post({
    url: "/appointment_mobile/order/autoCancel",
    data,
  });
}




//----------------订单处理 end
